System and method for local packet transport services within distributed routers

ABSTRACT

A system and method for routing packets within a router having a plurality of loosely-coupled route processors, including a first route processor, and a line card operably coupled to the plurality of distributed-route-processors. Each route processor includes an internal forwarding information base (IFIB). Each IFIB includes information that is used to route packets addressed to elements within the router.

FIELD OF THE INVENTION

This invention relates generally to network routers, and moreparticularly to local packet transport services for network routershaving distributed route processors.

BACKGROUND OF THE INVENTION

A router is a device that forwards traffic between networks. Routers useheaders and a forwarding table to determine where packets go, and theyuse messaging such as the Border Gateway Protocol (BGP) to communicatewith each other and configure the best route between any two hosts.

Conventional routers include a packet forwarding component and a routeprocessor (RP). The RP determines and controls configuration, security,accounting, debugging, and network management processes of thepacket-forwarding component. Examples of route processors include theCisco® CSC/3 and the CSC/4 route processors. Route processors aretypically implemented on an electronic printed circuit board.

The RP typically has relatively more processing and resourcerequirements than the packet-forwarding component. As the trafficbetween networks increases, router capacity must also increase. Thisplaces an even greater processing demand on the RP. The RP can,therefore, become a “bottleneck” as processing in the router is slowedby inadequate processing capability within the RP.

One solution for meeting the increased processing demands on the RP isto distribute the RP function across two or more loosely coupledprocessors. A problem with this approach is how to direct locallyaddressed packets to the appropriate RP out of the two or moredistributed route processors. Another problem is how to reassemblefragments in an RP distributed across two or more processors.

For the reasons stated above, and for other reasons stated below whichwill become apparent to those skilled in the art upon reading andunderstanding the present specification, there is a need in the art fora system and method for routing packets within routers havingdistributed route processors.

SUMMARY OF THE INVENTION

The above-mentioned shortcomings, disadvantages and problems areaddressed by the present invention, which will be understood by readingand studying the following specification.

According to one aspect of the present invention, a router includes aplurality of loosely coupled route processors, including a first routeprocessor, and a line card operably coupled to the plurality ofdistributed-route-processors. Each route processor includes an internalforwarding information base (IFIB), wherein each IFIB includesinformation used to route packets addressed to the router.

According to another aspect of the present invention, a router includesa plurality of route processors, including a first route processor, anda line card operably coupled to the plurality ofdistributed-route-processors. Each route processor includes an internalforwarding information base (IFIB), wherein the IFIB is used to directinbound packets to a particular set of router elements within therouter, and one of the plurality of distributed-route-processorsincludes a port arbitrator, wherein the port arbitrator assembles theIFIB and distributes it to the route processors.

According to another aspect of the present invention, a method formanaging a router includes receiving a locally addressed packet anddetermining if the packet lacks a defined flow. If the packet lacks adefined flow, the method assigns a session to one of a plurality ofroute processors as a function of a router policy and forwards thepacket to the assigned route processor.

According to another aspect of the present invention, a method formanaging a router having a plurality of elements, including a routeprocessor and a line card, includes generating an internal forwardinginformation base (IFIB), wherein the IFIB maps one or more flows toelements within the router, and distributing the internal forwardinginformation base to at least one element in the router.

According to another aspect of the present invention, a method forhandling a packet fragment in a router having a plurality of routeprocessors includes receiving a plurality of packets, detecting packetfragments from among the packets, routing the packet fragments to aroute processor as a function of a packet fragment routing policy,assembling the packet fragments into a reassembled packet, and routingthe reassembled packet to a route processor as a function of an internalforwarding information base (IFIB).

The present invention describes systems, clients, servers, methods, andcomputer-readable media of varying scope. In addition to the aspects andadvantages of the present invention described in this summary, furtheraspects and advantages of the invention will become apparent byreference to the drawings and by reading the detailed description thatfollows.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a system-level overview of anembodiment of the invention;

FIGS. 2-6 are block diagrams illustrating alternate embodiments of theinvention; and

FIG. 7 is a flowchart of a computerized method for handling a packetreceived by a router according to an embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description of embodiments of the invention,reference is made to the accompanying drawings that form a part hereof,and in which is shown by way of illustration specific embodiments inwhich the invention may be practiced. These embodiments are described insufficient detail to enable those skilled in the art to practice theinvention, and it is to be understood that other embodiments may beutilized and that logical, mechanical, electrical and other changes maybe made without departing from the scope of the present invention. Thefollowing detailed description is, therefore, not to be taken in alimiting sense, and the scope of the present invention is defined onlyby the appended claims.

As noted above, routers use headers and a forwarding table to determinewhere packets should be routed. A router typically includes a forwardinginformation source that maps header information in incoming networkpackets to the addresses of other routers in the network space. Theforwarding information source is distributed to individual components inthe router on an as-needed basis (or may be updated synchronously) to beused in forwarding incoming packets.

A router must be able to handle locally addressed packets. A locallyaddressed packet is a packet that is addressed to the router, having therouter as the final destination. It may also be addressed to a specificsub-component or element of the router. As noted above, the process offorwarding a locally addressed packet to a route processor isparticularly difficult in routers having two or more route processors.

This detailed description is divided into five sections. In the firstsection, a system level overview of one embodiment of the invention ispresented. In the second section, more detailed embodiments of theinvention are described. In the third section, methods for an embodimentof the invention are provided. In the fourth section, the hardware andthe operating environment in conjunction with which embodiments of theinvention may be practiced are described. Finally, in the fifth section,a conclusion of the detailed description is provided.

System Level Overview

FIG. 1 is a block diagram that provides a system level overview of theoperation of one embodiment of the present invention. Router 100includes route processors (route processors) 12 connected across anetwork 14 to one or more line cards 16. Line cards 16 receive packetsfrom line interface 17. In one embodiment, one of the route processors12 includes a flow manager 18. Flow manager 18 includes an internalforwarding information base (IFIB) 20. In the embodiment shown in FIG.1, a port arbitrator (PA) 22 assembles the IFIB 20 based on a routerpolicy and distributes it to flow manager 18.

In one embodiment, port arbitrator 22 includes software for monitoringflow manager 18 and for starting a new flow manager 18 on a second routeprocessor 12 if it detects that the original flow manager has failed.

Flow manager 18 and port arbitrator 22 can also be implemented inprocessors other than route processors 12 either within or outside ofrouter 100.

FIG. 2 is a block diagram that provides a system level overview of theoperation of another embodiment of the present invention. Router 200includes route processors (route processors) 12 connected across anetwork 14 to one or more line cards 16. Line cards 16 receive packetsfrom line interface 17. In the embodiment shown, two of the routeprocessors 12.1 and 12.2 include flow managers 18. As in system 100 ofFIG. 1, each flow manager 18 includes an internal forwarding informationbase (IFIB) 20 used to route internally addressed packets. In contrastto router 100, however, in router 200 processing of packet flows isdistributed across the flow managers 18, allowing system 200 to scale tohandle the resource demands imposed by increasing numbers of incomingnetwork packets.

In the embodiment shown in FIG. 2, a port arbitrator (PA) 22 executingin route processor 12.3 assembles the IFIB 20 based on a router policyand distributes all or part of it to each of the flow managers 18. Inone such embodiment, the router policy includes consideration for loadbalancing between flow managers 18.

As in router 100 of FIG. 1, flow manager 18 and port arbitrator 22 canalso be implemented in processors other than route processors 12 eitherwithin or outside of router 200.

FIG. 3 is a block diagram that provides a system level overview of theoperation of one embodiment of the present invention. Router 300includes route processors (route processors) 12 connected across anetwork 14 to one or more line cards 16. Line cards 16 receive packetsfrom line interface 17. In one embodiment, one of the route processors12 includes a flow manager 18. Flow manager 18 includes an internalforwarding information base (IFIB) 20. In the embodiment shown in FIG.3, a port arbitrator (PA) 22 assembles the IFIB 20 based on a routerpolicy and distributes it to flow manager 18.

In the embodiment shown in FIG. 3, line cards 16 and route processors 12include a pre-IFIB 24, a table of forwarding information used to routeinternally addressed packets. In one embodiment, the pre-IFIB is asubset of the IFIB used by flow manager 18. Pre-IFIB 24 is used toexpedite forwarding of pre-established flows through each line card 16and route processor 12. In one such embodiment, port arbitrator 22distributes pre-IFIB 24 when port arbitrator 22 updates the IFIB in flowmanager 18. In another embodiment, the contents of pre-IFIB 24 areupdated by flow manager 18 on an as-needed basis.

In one embodiment, port arbitrator 22 includes software for monitoringflow manager 18 and for starting a new flow manager 18 on a second routeprocessor 12 if it detects that the original flow manager has failed.

As in routers 100 and 200 of FIGS. 1 and 2, flow manager 18 and portarbitrator 22 can also be implemented in processors other than routeprocessors 12 either within or outside of router 300.

FIG. 4 is a block diagram that provides a system level overview of theoperation of another embodiment of the present invention. Router 400includes route processors (route processors) 12 connected across anetwork 14 to one or more line cards 16. Line cards 16 receive packetsfrom line interface 17. In the embodiment shown, two of the routeprocessors 12.1 and 12.2 include flow managers 18. As in system 200 ofFIG. 2, each flow manager 18 includes an internal forwarding informationbase (IFIB) 20 used to route internally addressed packets. As in router200, processing of packet flows is distributed across the multiple flowmanagers 18, allowing system 400 to scale to handle the resource demandsimposed by increasing numbers of incoming network packets.

In the embodiment shown in FIG. 4, a port arbitrator (PA) 22 executingin route processor 12.3 assembles the IFIB 20 based on a router policyand distributes it to each of the flow managers 18. In one suchembodiment, the router policy includes consideration for load balancingbetween flow managers 18.

In the embodiment shown in FIG. 4, line cards 16 and route processors 12include a pre-IFIB 24, a table of forwarding information used to routeinternally addressed packets. In one embodiment, the pre-IFIB is asubset of the IFIB used by flow manager 18. In one such embodiment,pre-IFIB 24 is distributed by port arbitrator 22 when PA 22 updates theIFIB in flow manager 18. In another embodiment, the contents of pre-IFIB24 are written by flow manager 18 on an as-needed basis. Otherembodiments are contemplated where the pre-IFIB is used on only a subsetof line cards 16, or route processors 12, or on a combination of linecards 16 and route processors 12.

As in routers 100, 200 and 300 of FIGS. 1-3, flow manager 18 and portarbitrator 22 can also be implemented in processors other than routeprocessors 12 either within or outside of router 400.

In one embodiment, port arbitrator 22 includes software for monitoringflow managers 18 and for starting a new flow manager 18 if it detectsthat one of the original flow managers 18 has failed.

In each of the examples above, line card 16 receives a network packetvia line interface 17 and determines the RP 12 in the router to forwardthe packet to using IFIB 260. In the embodiments shown in FIGS. 1 and 2,the packet is automatically routed to one of the flow managers 18. Inthe embodiments shown in FIGS. 3 and 4, the line card consults thepre-IFIB to determine if it knows the destination of the internallyaddressed packet already. If so, the packet is forwarded to theappropriate element in the router. If not, the packet is routed to oneof the flow managers 18.

The identical IFIBs in the router introduce an economy of scale ingenerating the IFIBS. The IFIBs are generated before the arrival of apacket, thus reducing the amount to time needed to determine where apacket should be forwarded.

In one embodiment, the route-processing throughput of the routeprocessors 12 is balanced against the input and output capability of theone of more line cards 16. In one such embodiment, the number of routeprocessors 12 is chosen to substantially match or equal the input andoutput capability of the one of more line cards 16.

More detailed embodiments of routers according to the present inventionwill be discussed next. In the following description, a route processoris an independent processing element with independent memory. An elementis a line card, route processor, or other independently addressabledevice within the router. A logical router is an independentlyadministered partition of the router.

A flow is a binding between a <protocol, remote address, remote port,local address, local port> tuple and an element.

An Internal Forwarding Information Base (IFIB) is that portion of theForwarding Information Base (FIB) used to direct incoming packets to theproper element(s) within the router.

Local Packet Transport Services (LPTS) is the name of the service usedto distribute locally addressed packets.

RST is the TCP/IP ReSeT packet. It is used to reject a TCP connection.

FIG. 5 is a block diagram of one embodiment of router 300 of FIG. 3. Inthe embodiment shown in FIG. 5, a flow manager 18 executes on one RP 12while port arbitrator 22 runs on another RP 12. (In another embodiment,both flow manager 18 and port arbitrator 22 execute within one RP 12.)

In the embodiment shown in FIG. 5, each line card 16 is connectedthrough network 14 to route processors 12. In the example shown network14 is a switch fabric. Other networks are contemplated within the scopeof the present invention.

Each line card 16 includes a line interface 17 and a pre-IFIB 24. In oneembodiment, each line interface 17 is connected to one or more peerprocesses 37 over a network 38.

FIGS. 5 and 6 illustrate the overall structure of LPTS. Components withdotted outlines are other parts of router system that interact directlywith LPTS, but are not part of it. A new data structure, IFIB 20, isused to direct inbound packets to a particular set of elements, once thepackets have been identified as destined for the router itself. The IFIBperforms the function of a Flow Routing Table.

As noted above, in the embodiment shown in FIG. 5, a Flow Manager 18runs on one of the route processors 12. In such an embodiment, flowmanager 18 receives locally addressed packets. If a packet matches adefined flow, it is forwarded to the element or elements that areinterested in it; if not, it uses policy information to dynamicallyassign a new session to a particular element, or to reject it.

An abbreviated copy of the IFIB, Pre-IFIB 24, is present on each linecard 16 and in the packet switching process on each RP 12. Pre-IFIB 24is used to do initial triage on locally destined packets, directing themto the correct element, or to Flow Manager 18 for further processing.

As noted above, a port arbitrator 22 operates on one of the routeprocessors 12. The Port Arbitrator constructs the IFIB 20 and thePre-IFIBs 24, aggregating flow information that is supplied to it by thenetwork stacks 30 on each RP 12, and static policy information that issupplied to it by applications. There is only one Port Arbitrator perLogical Router.

Network stack 30 assigns port numbers, and manages external data flows.Network stack 30 on each RP 12 has been modified such that operationsassigning port numbers or setting up or tearing down external data flowsare now reported to, or coordinated with the Port Arbitrator 22. In oneembodiment, network stack 30 forwards the following information to theport arbitrator 22: TCP and UDP bind requests, wherein the bind requestis a request to reserve a local port and IP address, or the bind requestis a request to allocate a local port; TCP listen indications; outboundTCP connect indications, wherein the outbound TCP connect indicationsreserve a local port and at least one Internet Protocol (IP) address, orreserve a specific remote port and at least one IP address; socket closeindications; raw IP and IS-IS interface selection requests; andmulticast group join and leave operations.

As noted above, an abbreviated copy of the IFIB, Pre-IFIB 24, is presentin the packet switching process on each RP 12. In one such embodiment,network stack 30 manages Pre-IFIB 24 in conjunction with flow manager18. In another such embodiment, network stack 30 manages Pre-IFIB 24 inconjunction with port arbitrator 22.

FIG. 6 shows an embodiment on a router 400 having distributed flowmanagers 18. In one such embodiment, full copies of “slices” of IFIB 20(split up for load-balancing purposes) are present in each of the FlowManagers 18. As in FIG. 5 above, an abbreviated copy of the IFIB, calledthe Pre-IFIB 24, is present on each line card 16 and in the packetswitching process on each RP 12. Pre-IFIB 24 is used to do initialtriage on locally destined packets, directing them to the correctelement, or to a Flow Manager 18 for further processing.

As in FIG. 5 above, a port arbitrator 22 operates on one of the routeprocessors 12. The Port Arbitrator constructs the IFIB 20 and thePre-IFIBs 24, aggregating flow information that is supplied to it by thenetwork stacks 30 on each RP 12, and static policy information that issupplied to it by application-specific policy modules. Again, there isonly one Port Arbitrator per Logical Router.

Again, network stack 30 on each RP 12 has been modified such thatoperations assigning port numbers or setting up or tearing down externaldata flows are now reported to, or coordinated with the Port Arbitrator22.

In one embodiment, port arbitrator 22 includes a list of listeners. Eachlistener represents an application that wants to receive some type ofpacket flow.

Port Arbitrator

There is one port arbitrator 22 per logical router. Port Arbitrator 22controls distribution of the protocols supported by LPTS (Raw IP, TCP,UDP, IS-IS, and multicast group memberships). Port arbitrator 22 alsoperforms port allocation. That is, when a network stack 30 within one ofthe elements (e.g., 16 or 12) needs a local TCP/IP port, it asks portarbitrator 22 to provide it.

The network stack (and other local processing entities) on each elementforwards the following information to Port Arbitrator 22:

-   -   TCP and UDP bind requests (reserve a local port+IP address, or        allocate a unique local port)    -   Raw IP socket bind requests    -   TCP listen indications    -   Outbound TCP connect indications (reserve local port+IP address,        specific remote port+IP address)    -   Socket close indications    -   Raw IP and IS-IS interface selection requests    -   Multicast group join and leave operations

Port Arbitrator 22 keeps track of the address tuples that are bound byeach network stack 30 on routers 100, 200, 300, 400. In one embodiment,these tuples are:

-   -   Scope (entire Logical Router or just this element)    -   Network interfaces (can be ‘any’)    -   Layer 3 protocol (IPv4, IPv6, IS-IS)    -   Local Layer 3 addresses (can be ‘any’, and can be multicast        addresses)    -   Layer 4 protocol (can be ‘any’ for IS-IS)    -   Local Layer 4 port (can be ‘any’ for Raw IP and IS-IS), or        packet type (e.g., ICMP packet type or IPsec SPI value)    -   Remote Layer 3 addresses (can be ‘any’)    -   Remote Layer 4 port (can be ‘any’)

(In general, socket-based applications generate bindings that areLogical Router-wide in scope, while other applications (such as IPv6Neighbor Discovery, or ICMP Echo Request processing) generate bindingsthat are local to a particular element).

In one embodiment, Port Arbitrator 22 allocates unique unused(ephemeral) TCP and UDP ports.

In one embodiment, Port Arbitrator 22 generates the Internal FIB (IFIB)20 for the Flow Managers 20, and the Pre-IFIB 24 for each element, sothat received TCP, UDP, Raw IP, and IS-IS packets that are addressed tothe router itself can be forwarded to the correct, terminating element.Port Arbitrator 22 is the only entity on a logical router that generatesIFIB and Pre-IFIB entries. In one such embodiment, port arbitrator 22generates each IFIB entry based on a static router policy 32.

In one embodiment, port arbitrator 22 also arbitrates between routeprocessors 12 trying to access conflicting areas or ports. For example,Telnet servers on two or more route processors 12 have to explicitlyspecify remote addresses in order not to overlap. If a first RP 12requests to be Telnet server for a particular network and a second RP 12requests to be Telnet server for the same network, the second requestwill be rejected. (If, however, the second request is to a subset of theparticular network, there is no problem. The more specific request willbe encountered in the IFIB first.) Similarly, if two or more routeprocessors attempt to listen exclusively on the same TCP or UDP port,the Port Arbitrator will allow only one of the requests to succeed.

As noted above, for each meaningful endpoint that is being listened onin a Logical Router, Port Arbitrator 22 maintains a list of listeners.The definition of a listener is protocol specific, and is defined in thecorresponding documents.

In addition, Port Arbitrator 22 maintains a set of Fabric GroupIDentifiers (FGIDs). The set of FGIDs include multicast addresses forthe switch fabric, providing routing for the internal delivery ofpackets to multiple destinations. This is primarily for the delivery ofmulticast packets to multiple internal clients, but is also used todeliver packets to multiple route processors 12 that have identicalbindings.

In one embodiment, Port Arbitrator 22 checkpoints its state, so that anew Port Arbitrator 22 can be started in the event that the active PortArbitrator 22 fails. Since the Port Arbitrator does not participate inany active data flow, and does not examine or generate any data packets,existing connections are unaffected by a failure of the Port Arbitrator.

(Note that the data necessary to restart the Port Arbitrator may berecovered from the network stacks on each element in the system and fromthe Flow Managers, so checkpointing would be necessary only for thefastest possible recovery from failures. In one embodiment, PortArbitrator 22 checkpoints the list of clients that are connected to it,so that if it is restarted, it can quickly determine when all of itsprevious clients have reconnected to it and replayed their bindings.)

In one embodiment, a Process Placement Daemon starts Port Arbitrator 22.In one embodiment, the RP 12 selected to run port arbitrator 22 is afunction of its processing and memory requirements and not any affinityfor any other process.

The IFIB and the Pre-IFIB

Because there can be multiple elements which can terminate some flows inrouters 300 and 400, when a line card 16 receives a packet that isaddressed to the router itself, it cannot simply forward it “to the RP.”

Similarly, when an RP 12 receives a packet on its GigE interface that isaddressed to the router itself, it cannot simply process it locally.Instead, a second FIB must be used to map protocols, addresses, andports to a particular element. This is referred to as the Internal FIB(IFIB).

The FIB specifies that when a received packet is destined for the routeritself, further matches must be made on each of the fields specifiedunder Port Arbitrator 22, above, plus a one-bit field indicating whetherthe packet is fragmented.

In one embodiment, each entry of the IFIB includes five values:

1) An opcode, which specifies what to do with the packet. The opcode canspecify one of three values:

-   -   Deliver. The packet is to be delivered to the element(s)        specified in the element list.    -   Drop. The packet is to be dropped silently.    -   Reassemble. The packet is to be delivered to some RP 12, based        on a hash of the layer 3 source and destination addresses.

2) An element list, specifying the elements to forward the packet to. Inpractice, the element list is a single switch fabric address, which maybe the address of a single element, or an FGID, representing multipleelements. (In one embodiment, Port Arbitrator 22 manages its own set ofFGIDs for this purpose.)

3) An internal forwarding priority, used to assign relative prioritiesfor internal resources (such as switch fabric 14) used for inboundpackets. A flow with a high internal forwarding priority is referred toas a critical flow.

4) A listener tag, which uniquely identifies the process to deliver thepacket to on those elements. This either identifies the local IP orIS-IS stack, if this is the packet's ultimate destination, or a FlowManager 18 process.

5) A local flag, which indicates that some entity on this element hasinterest in this packet (in element-local scope).

In the embodiment shown in FIG. 6, IFIB 20 is split into slices 26 forload-balancing purposes. In one embodiment, the initial definition of aslice is a Layer 4 protocol. Each slice 26 is distributed to aparticular Flow Manager process. Should the processing burden on aparticular Flow Manager process grow too large, slices 26 can be furthersubdivided. For TCP and UDP, this can be based on destination port orport range boundaries; for OSPF and IS-IS, this can be based on linecard boundaries.

IFIB 20 is not distributed piecemeal to all elements in the system.Instead, a Pre-IFIB 24 is distributed synchronously to each element, andIFIB slices 26 are distributed synchronously to each Flow Managerprocess.

As noted above, Pre-IFIB 24 is a subset of IFIB 20. In one embodiment,Pre-IFIB 24 is generated by Port Arbitrator 22 and distributed to eachline card 16 and to the packet switching process 28 running on each RP12 (not shown).

In one embodiment, when PA 22 is asked to set up a binding, it blocksuntil the IFIB slice 26 is updated for that binding. PA 22 goes to theFM 18 for that service. The flow manager updates its tables and lets PA22 know it is OK. PA 22 then updates the line cards 16, where data maybe queued before applied to the pre-IFIB in a batch.

In one embodiment, the Pre-IFIBs in the TCAMs are updated synchronously.

Pre-IFIB 24 is used to do initial processing on a packet, once it hasbeen identified as being local to the router. Pre-IFIB 24 containsinformation to distinguish packets in critical flows, which may beuseful to line cards 16 during periods of receive-side congestion.

In one embodiment, Pre-IFIB 24 is consulted at two very specific timesin inbound packet processing: 1) after a FIB lookup has indicated thatthe packet is destined for the router itself; and 2) when a line card isin Congestion Mode, Pre-IFIB 24 may be consulted prior to the FIBlook-up, to determine if a packet belongs to a critical flow, or if itcan be discarded. The congestion handling process is discussed below.

If the destination for a packet is trivial (e.g., there is only oneprocess on the router listening for TELNET connections), then Pre-IFIB24 directs the packet to the correct elements. Otherwise, the Pre-IFIBdirects the packet to the proper Flow Manager process on an RP 12.Pre-IFIB 24 always contains default entries for TCP and UDP, directingunbound TCP and UDP packets to their respective Flow Managers 18.

In one embodiment, Pre-IFIB 24 is implemented within a ternary contentaddressable memory (ternary CAM or TCAM) on each element. A TCAM is acontent addressable memory (CAM) with don't-care bits. A TCAM can beused to perform table look-ups based on multiple packet key fields atline speed. In this embodiment, it is also used to access each pre-IFIB24 at line speed.

In another embodiment, Pre-IFIB 24 is implemented as a TCAM on line card16 and in memory on RP 12. In such an embodiment, the size of Pre-IFIB24 on line card 16 is strictly limited, so that it can be implemented ina small region of a TCAM.

The TCAM also places some important restrictions on the structure andinterpretation of Pre-IFIB 24. In one such embodiment, Pre-IFIB 24 islimited to one entry is found per look-up. If there is more than onematch, the first matching entry will be used. And, if the local flag isset in the Pre-IFIB payload, and the opcode specifies something otherthan Drop, then the packet must not be terminated by the localprocessing entity—it must be duplicated so that it can also be deliveredto interested application(s) on Route Processors.

In one embodiment, each IFIB and Pre-IFIB is stored in a predefinedorder. In one such embodiment, IFIB entries are stored in order suchthat the most specific match hits first (i.e., entries go from specificto general). At the end are catch up cases used to handle packets thatwere not handled by higher priority entries.

In one embodiment, port arbitrator 22 folds less specific entries intomore specific entries. For example, a flow for ICMP packets of aparticular type may be combined with a flow for all ICMP packets,delivering the data to both elements.

In one embodiment, each update to the Pre-IFIB is just a single entry.In one such embodiment, each Pre-IFIB entry is distributed with a lookuppriority, which specifies the order it is to be searched relative toother Pre-IFIB entries, and a storage priority, which indicates therelative priority of this entry for inclusion in the TCAM. The Pre-IFIBManager inserts the entry into the Pre-IFIB as a function of both thelookup priority and the storage priority in order to place it in thecorrect place in the hierarchy.

In one embodiment, Pre-IFIB 24 is logically divided into two sections.The static section consists of default entries, which direct packets tothe flow managers 18, as well as entries that are used to distinguishcritical flows. (These entries have the highest storage priority.) Thedynamic section consists of entries for individual flows.

In one embodiment, a Pre-IFIB Manager Process running on each Line Card16 and on each RP 12 is responsible for maintaining its copy of Pre-IFIB24. The Pre-IFIB Manager Process handles TCAM overflow, adding anddeleting entries based on their storage priority. This process is alsoresponsible for ignoring entries that do not apply (e.g., entries whichspecify interface filters for interfaces which do not exist on thatelement).

The update rate for the static section of the Pre-IFIB should be nogreater than the frequency with which the system is reconfigured, eitherthrough explicit manual reconfiguration, or by implicitly throughfailure recovery or dynamic load re-balancing. These events should berelatively infrequent; coming in bursts of perhaps 100 entries everyminute or two. Since the generation of entries in the dynamic section ofthe Pre-IFIB is optional (i.e., system integrity will not suffer if itis sub-optimally filled), the update rate for these entities can betuned to a reasonable value to avoid overloading the TCAM, line cardCPU-to-TCAM interface, or IPC bandwidth between an RP 12 and a line card16. (Note that this means that a given Pre-IFIB 24 may be out-of-datewith respect to the full IFIB 20. This is harmless.)

Note that in order to maintain the behavior of a unified router, allnetwork interface addresses must be treated as router-wide IP Addresses.Thus, there is no distinction in the behavior of an element that “owns”an interface address and one that does not. Similarly, there is noexplicit need to overlay an internal IP network on the switch fabric 14,in order to forward data internal to routers 100, 200, 300 or 400.

As noted above, it can be difficult to handle fragmented IP packets inrouters having two or more route processors 12. Fragmented IP packetsare an exception to the IFIB look-up procedure. Only the first packet ina plurality of associated IPv4 packet fragments includes a transportheader. (It should be noted that a transport header might not be presentin even the first fragment of an IPv6 packet.) Packets without transportheaders cannot be used to retrieve routing information from an IFIB 20.

In one embodiment, fragmented IP packets are handled by a reassembleopcode in the Pre-IFIB payload. Fragments are sent to a specified RP 12for reassembly. In one embodiment, the RP is chosen from among the setof active route processors by hashing on the source and destination IPaddresses.

When the fragmented packet is complete, the RP 12 selected must thentreat the packet as if it had just arrived on an external interface,i.e., do a Pre-IFIB look-up on it. Should the timeout expire before thecomplete packet arrives, the RP should generate an ICMP Time Exceededmessage, specifying, “fragment reassembly time exceeded.”

Note that switch fabric 14 has its own MTU, which is well below themaximum IP packet size. Thus if a reassembled packet exceeds that MTU,it would need to be re-fragmented to send it to the proper element. Onesimple way to avoid this would be to ensure that the IP reassembly logicmaintains complete copies of the original fragments. When all fragmentsare present, they could be forwarded individually to the correctelement. Each fragment would, by definition, fit within the switchfabric MTU. Note that these fragments must be specially tagged to avoidhaving the destination element perform another Pre-IFIB look-up on them.Note also that fragments that arrive on multiple interfaces, for anylayer 4 protocol other than TCP or UDP, should be dropped.

As noted above, only a single Pre-IFIB entry is to be acted on perpacket. However, situations can arise where it is impossible for asingle Pre-IFIB entry to precisely specify which elements are to receivea given packet. Because of this, Pre-IFIB 24 may under-specify thematching criteria in a given entry, causing some unwanted packets to beforwarded to some elements.

Thus, in one embodiment, each element is prepared to filter and silentlydiscard packets that it has no clients for. This means that thegeneration of TCP RST segments must be disabled on all elements, as mustthe generation of ICMP Port Unreachable and Protocol Unreachablemessages. The Flow Managers 18 perform these functions centrally.

It should be noted that IFIB 20 and the access control list (ACL), ifany, are independent entities. Though they may both use the samehardware, they perform independent functions and are managed separately.In one embodiment, ACL processing may be performed before or after aPre-IFIB look-up; it makes no difference to the functioning of LPTS.

Memory requirements within routers 300 and 400 will be discussed next.In one embodiment, the full IRIB (the bindings as reported by thenetwork stack on each element) is maintained in the memory space of thePort Arbitrator process. The full IFIB (an aggregation of the entries inthe IRIB) is maintained in the memory space of the Port Arbitratorprocess. Slices of the full IFIB are maintained in the memory spaces ofeach Flow Manager process. (These entries also need to includestatistical information, so they will be slightly larger than theentries kept in Port Arbitrator 22. In aggregate, this is the samenumber of entries as in the full IFIB, but each slice may be on adifferent RP 12.

For performance reasons, in one embodiment, these IFIB slices areduplicated in the packet switching process' address space on the RP 12on which each Flow Manager 18 is running. A software copy of Pre-IFIB 24is also maintained in a process on each element line card 16 and RP 12,both for use in programming or reprogramming the TCAMs, and for thesoftware-switching path.

In order to recover from FGID database process restarts, in oneembodiment Port Arbitrator 22 maintains a list of the FGIDs itallocates, as well as the list of the members it adds to each FGID.

IFIB Generation Procedure

The Port Arbitrator uses a simple algorithm to translate sets ofbindings into IFIB entries:

-   -   Identical bindings are combined into flows. If the bindings are        from different route processors, an FGID is allocated to allow        delivery to all interested listeners.    -   Superset/subset relationships are identified. A subset flow        matches a subset of packets that also match a superset flow. The        list of route processors from the superset flows are added to        the lists of route processors from the subset flows, so that        packets are delivered to all.    -   Conflicting flows are avoided by ignoring certain key fields or        bindings. Two flows are in conflict if they both match the same        packet, using a different wild-card match. For example, a flow        which wants all ICMP packets of type t, regardless of interface,        and a flow which wants all IGMP packets from interface x, would        both match an IGMP packet of type t which arrives on        interface x. One solution to this problem is to generate a third        flow that matches both type t and interface x, sending the        packets to both flows' route processors. In one embodiment,        however, the solution employed is much simpler. In each case        where a conflict is possible because of the flexibility of the        key specifications, one or more of the keys is ignored in those        bindings.    -   Multicast source filters imply an additional flow. An        include-mode filter (specifying which source addresses the        router will accept packets from) implies an additional flow with        a wild-card source address and a drop opcode. An exclude-mode        filter (specifying which source addresses the router will not        accept traffic from) implies an additional flow with a wild-card        source address, delivering packets to the flows' route        processors 12.        The Flow Managers

When flow definitions are too complex to fit in the Pre-IFIB, or whenthere is not yet a defined flow for a packet, the packet is forwarded toa Flow Manager 18. In the system shown in FIG. 6, each Flow Managerprocess is responsible for forwarding packets associated with a slice ofthe IFIB 20.

The packets are dispatched in one of three ways:

-   -   If there is an existing flow for the packet, it is forwarded to        the correct elements.    -   If there is no existing flow for the packet, but a dynamic        distribution policy has been defined for the destination port in        the packet, then the associated policy module is consulted to        select an element to handle the connection. The packet is        forwarded to that element, and the IFIB is updated to reflect        the new session. (This applies only to UDP packets and TCP SYN        packets.)    -   If neither of the above cases is true, then an appropriate error        response will be generated (e.g., TCP RST or ICMP UDP Port        Unreachable), and the packet will be dropped. Note that this        means that the TCP and UDP Flow Managers 18 are responsible for        the generation of TCP RST segments and ICMP Port Unreachable        messages for an entire Logical Router.

In one embodiment, the Process Placement Daemon starts Flow Managers 18.In one embodiment, the RP selected to run each flow manager 18 is basedon its processing and memory requirements, not on any affinity for anyother process. For performance reasons, in one embodiment the switchinglogic in the Flow Managers (IFIB look-up) is implemented as adynamic-link library in the packet switching process.

In one embodiment, flow managers 18 keep statistical information for theIFIB entries that they use. They periodically identify high-volume flowsand submit these to Port Arbitrator 22 for inclusion in the dynamicportion of the Line Card Pre-IFIBs 24.

In one embodiment, port arbitrator 22 also maintains and aggregates aMulticast Group Membership List for each logical router. This listconsists of the IFIB entries that specify multicast local layer 3addresses; the remote layer 3 addresses, if specified, are the filters.In such an embodiment, port arbitrator 22 aggregates this list (removingthe element ID, layer 3 protocol, local port, and remote portinformation) and distributes it to line cards 16 and route processors12. The purpose of this list is to enable or disable multicastreception. Note that the Multicast Group Membership List is differentfor each line card 16, as it applies only to the interfaces for thatcard.

The Port Arbitrator also distributes the Multicast Group Membership Listto the IGMP protocol process 36, which uses it to generate local entriesin the MRIB. Note also that the Multicast Group Membership List isdistinct from the MRIB, which is generated and distributedindependently.

Port Arbitrator Network Stack Interface

A series of IPC calls is defined for communication between the elementnetwork stacks and Port Arbitrator 22:

-   -   pa_bind( ) establishes a binding of a particular data flow to an        element. The parameters are protocol specific and are covered in        the corresponding protocol documents.    -   pa_unbind( ) removes a binding requested by pa_bind( ).    -   ns_refresh( ) is a request that the Port Arbitrator makes of        each of the element network stacks 30. It is used when the Port        Arbitrator restarts, to request flow information from each. This        information is then provided in the form of ordinary pa_bind( )        requests, terminated by a pa_refresh_done( ) call, below.    -   pa_refresh_done( ) is an indication that an element network        stack has finished dumping its list of flows to the Port        Arbitrator in response to an ns_refresh( ) call. Note that in        order to preserve the consistency of LPTS, it is invalid for an        element network stack 30 to report a flow that it did not        already successfully hold, before it makes the pa_refresh_done(        ) call. However, since there is no way to enforce this rule, an        element network stack 30 must be prepared for a “refresh”        pa_bind( ) call to fail, even though it previously succeeded,        and to take the appropriate action (marking the socket as        unusable, causing subsequent I/O errors, etc.).

There may be multiple entities on a given element that use the PortArbitrator Network Stack Interface, e.g., one connection forsocket-based applications, which creates bindings with LR-wide scope,and another connection for local applications, which creates bindingswith element-local scope. The organization of these entities isimplementation-specific.

Port Arbitrator Client Interface

Port Arbitrator 22 provides an explicit interface to clients. It isindented for debugging and monitoring, and for low-volume run-time use,such as when a new BGP connection arrives (on the order of 7500 queriesper second).

The Port Arbitrator can be queried to learn if a given flow exists. Itreturns the IDs of the elements that are bound to it. The PortArbitrator can also be queried for all flows that match a givenwild-card pattern, such as all UDP flows, or all TCP flows from a givenpeer address.

Distribution Policy Interface

If there is more than one listener per logical router for a given wellknown TCP or UDP port, then it is necessary to decide where each inboundconnection will be handled. The Distribution Policy interface is used byapplication-specific logic to guide a Flow Manager 18 in thesedecisions. The distribution policy interface uses connections betweenpolicy modules and Port Arbitrator 22, one per TCP or UDP well knownport.

In one embodiment, PA 22 has tables for a variety of services. PA 22populates these tables based on configuration information and on thedynamic state of the router.

Distribution Policy comes in two flavors: static 32 and dynamic 34.Static policy 32 is used when the assignment of connections to elementsis made at configuration time, or is controlled by slowly changingcriteria. Static policy is implemented by allowing a binding thatrepresents a TCP or UDP listening socket to have an additionalparameter: the remote address (or remote address prefix) to receive newconnection requests from. This information is provided by theapplication, using an extension to the standard Sockets API.

Dynamic policy 34 is used when a distribution decision needs to be madeas each connection arrives. In one embodiment, this interface iscontrolled by one call and one callback:

-   -   dp_init( ) is used to initialize the connection and specify the        protocol (TCP or UDP) and local port that this policy will        control.    -   When a new connection arrives, the Flow Manager sends a        dp_dispatch message to the associated dynamic policy module. The        module responds with a message that indicates which element        should handle the connection, or that the connection should be        rejected.

In one embodiment, when port arbitrator 22 detects that a dynamic policymodule has disconnected, it will reject all new connections for theassociated port, until the dynamic policy module reconnects.

Fabric Interface

Because of the difficulty of passing anything but unicast TCP and UDPtraffic, LPTS does not treat the switch fabric 14 as an IP network.Instead, it treats it as a proprietary communications channel.

To do this, in one embodiment, when a packet is forwarded by LPTS acrossthe switch fabric 14, the fabric header includes a field indicating thedisposition of the packet. In one such embodiment, this field is anenumeration with the following values:

-   -   Punt. The packet is to be treated as if it had just arrived from        an external interface. It may be looked up in the FIB or MFIB,        and Pre-IFIB 24. It may be delivered to local applications,        transmitted on local interfaces, and forwarded to other        elements.    -   Transmit. The packet is to be forwarded to an external interface        or interfaces only. It must not be delivered to local        applications or forwarded to other elements.    -   Consume. The packet is to be consumed by the local network        stack, or dropped. It must not be looked up in IFIB 20 or        Pre-IFIB 24, and must not be forwarded to other elements.    -   Flow Manager t. The packet is to be delivered to Flow Manager t,        where t is a tag used to distinguish Flow Manager processes on a        given RP 12. Additional enumeration types may be defined for use        by other parts of the system.        Dynamic Behavior

LPTS recovery after a client process failure—There is no explicitrecovery mechanism in LPTS to handle client process failure. The normalprotocol-specific recovery procedures still apply, with the sockets heldby the processing being closed. This may result in one or morepa_unbind( ) calls being made by the element network stack to PortArbitrator 22 to remove the associated flows, which in turn may causePort Arbitrator 22 to update IFIB 20.

LPTS recovery after an RP failure—There is no special LPTS recovery fromRP failures. The applications on the RP are restarted (or are started ona backup RP); they re-establish their bindings and those bindings areconveyed by the transports to Port Arbitrator 22.

LPTS recovery after a Port Arbitrator failure—Should the Port Arbitratorfail (either due to a failure of the Port Arbitrator itself, or due to afailure of the RP on which the Port Arbitrator is running), a new PortArbitrator will be started. The transports will connect to the new PortArbitrator 22. Once a pa_refresh_done( ) has been received from eachelement (or a reasonable timeout has expired), the Port Arbitrator willconstruct a new IFIB 20.

At the same time, the Flow Managers 18 will connect to the new PortArbitrator 22, implicitly requesting a full download of their IFIBslices 26. They will mark all of their existing IFIB entries as “stale”,but continue using them. When a duplicate entry is received from PortArbitrator 22, the original entry's “stale” flag is cleared.

When the new Port Arbitrator indicates that all entries have beentransferred, the Flow Managers 18 will purge any IFIB entries that arestill marked as “stale.”

In one embodiment, Flow Managers 18 also supply Port Arbitrator 22 withinformation regarding the highest-volume flows, so that the PortArbitrator can reconstruct the dynamic Pre-IFIB entries for line cards16. Line cards 16 also reconnect to the new Port Arbitrator, and requestfull Pre-IFIB 24 downloads. They will use the same mark-and-sweeptechnique as the Flow Managers 18 to synchronize their databases.

In one embodiment, Port Arbitrator 22 supplies the static portion of thePre-IFIB 24 immediately. The dynamic entries may not be available at thetime that the line card reconnects, so sub-optimal routing through theFlow Managers 18 may occur for a brief period of time.

LPTS Recovery after a Flow Manager failure—Should a Flow Manager 18process fail, some data flows may be interrupted until it recovers. Thisis because the Flow Manager 18 is responsible for directing data packetsfor low-volume flows that are not recorded in Pre-IFIB 24.

No special action is taken by LPTS until the Flow Manager process isrestarted. At that time, the new Flow Manager connects to PortArbitrator 22, and requests a full copy of its IFIB 20 or its IFIB slice26. Dynamic policy modules 34 connect to the new Flow Manager 18. ThePort Arbitrator 22 then refreshes the Flow Manager's copy of the IFIB 20or IFIB slice 26 that it controls.

As soon as it restarts, the new Flow Manager 18 begins accepting inboundpackets. However, until it receives an indication from the PortArbitrator 22 that the full IFIB slice 26 has been completely received,it will not reject any packets. That is, it will not generate any ICMPUnreachable or TCP RST messages). Instead, it will drop those packetssilently.

LPTS Recovery after a Line Card failure—LPTS will take no special actionin response to a line card failure, until the line card 16 restarts.When the line card restarts, it will request a Pre-IFIB refresh from thePort Arbitrator. The Port Arbitrator 22 then supplies a full copy of theline card's Pre-IFIB 24.

Packet Processing

Packet processing of packets within routers 300 and 400 will bediscussed in the context of FIG. 7. In the flowchart of FIG. 7, at 700 apacket is received at an element of router 300 or 400. The element maybe a line card 16, it may be a route processor 12, or it may be someother element capable of receiving a packet and routing it throughswitch fabric 14. The element determines, at 702, whether the packet isa locally addressed packet. If not, the packet is forwarded outside therouter as a function of the forwarding Information Base (FIB). If,however, the packet is a locally addressed packet, the element consultsits Pre-IFIB 24 at 706.

If the packet matches an entry in Pre-IFIB 24 having one or moredestination elements, the packet is forwarded to the destinationelement(s) at 708. If not, the packet is forwarded, at 710, to routeprocessor 12 having the flow manager 18 associated with the packet.

The route processor 12 having the flow manager 18 associated with thepacket receives the packet and, at 712, consults its IFIB 20 (or IFIBslice 26). If the packet matches an entry in IFIB 20 (or IFIB slice 26),control moves to 714 and the packet is forwarded to the destinationelement(s) listed in the IFIB entry.

If, however, the packet does not match an entry in IFIB 20 (or IFIBslice 26), control moves to 714 and a request is made to the associateddynamic policy module to apply the dynamic policy to the packet. Ifthere is no dynamic policy for this packet type, or if the dynamicpolicy indicates that the connection should be rejected, Flow Manager fgenerates an error response (e.g., TCP RST or ICMP UDP Port Unreachable)and the process is complete.

If the dynamic policy indicates that the connection should be accepted,control moves to 722 and the packet is sent to the destinationelement(s) determined by the dynamic policy. Control then moves to 724and an IFIB entry is created and stored to IFIB 20 and Pre-IFIB 24.

Examples of packet processing will be reviewed next. This is notintended to be a complete set of packet processing scenarios but rathera representative sampling of processing for different types of packets.First, packet processing when a new connection packet arrives at elementr is described.

When a new connection packet arrives at element r, element r looks upthe packet in the FIB and determines that it is local. Element r looksup packet in the Pre-IFIB 24; the Pre-IFIB entry corresponding to thepacket points to Flow Manager t on element f. Element r forwards thepacket to element f, over the switch fabric 14 with a fabric header oftype Flow Manager (t).

Element f decodes the fabric header, using the tag to identify FlowManager t. Flow Manager t looks up the packet in the full IFIB slice 26it controls. If there is a match, IFIB slice 26 yields a fabric addresse. Otherwise, Flow Manager t applies the dynamic policy to determine theelement e to process the connection.

Flow manager t forwards packet to element e, over the fabric 14. Fabricheader is of type Consume. Element e decodes fabric header and sees typeConsume. Element e bypasses FIB/Pre-IFIB look-ups and processes thepacket locally, delivering the packet to an application.

As noted above, if there is no dynamic policy for this packet type, orif the dynamic policy indicates that the connection should be rejected,Flow Manager f generates an error response (e.g., TCP RST or ICMP UDPPort Unreachable).

A similar process occurs when a packet in a low-volume flow arrives atelement r. That is, when the Pre-IFIB associated with element r does notcontain an entry that is a complete match to the low-volume flow.

When an existing high-volume connection packet arrives at element r,element r looks up packet in the FIB and determines that it is local.Element r then looks up packet in the Pre-IFIB associated with elementr. If there is an exact match in Pre-IFIB 24, the Pre-IFIB entry pointsto element e and has a type Consume. Element r then forwards packet toelement e, over the fabric 14 with a fabric header of type Consume.Element e decodes fabric header and sees type Consume. Element ebypasses FIB/Pre-IFIB look-ups and processes the packet locally,delivering the packet to an application.

Multicast packet processing will be described next. A multicast packetarrives on receiving element r. If element r looks up the packet in theMulticast Forwarding Information Base (MFIB) and finds the local copyflag set for the ingress interface, element r then looks up the packetin the Pre-IFIB associated with element r. The Pre-IFIB entry points toelement list l (an FGID) and type Consume. Element r forwards packet toelement list l, over the fabric. Fabric header includes a tag indicatinglocal consumption. For each element e in element list l:

-   -   Element e decodes fabric header, sees type Consume.    -   Element e bypasses MFIB/Pre-IFIB look-ups and processes packet        locally.    -   Element e delivers packet to application.

If element r looks up the packet in the MFIB and finds an element list l(an MFIB FGID), element r forwards the packet to element list l. Foreach egress element e in element list l, element e looks up the packetin the MFIB. If the MFIB entry has the local copy bit set for thisinterface, element e looks up packet in the Pre-IFIB associated withelement e. If the Pre-IFIB entry points to element list l2 (an LPTSFGID) and type Consume, element e forwards packet to element list l2,over the fabric with type Consume. For each element e2 in element listl2:

-   -   Element e2 decodes fabric header, sees type Consume.    -   Element e2 bypasses MFIB/Pre-IFIB look-ups and processes packet        locally.    -   Element e2 delivers the packet to an application.

If element r looks up the packet in the MFIB and finds the local copyflag set for the ingress interface, element r then looks up the packetin the Pre-IFIB associated with element r. If the Pre-IFIB entry pointsto Flow Manager t on element f, element r forwards the packet to elementf over the fabric 14 with a fabric header including type FlowManager(t). Element f decodes fabric header, using the tag to identifyFlow Manager t. Flow Manager t looks up the packet in the full IFIBslice 26 that it controls.

If there is no match, the packet is dropped. If there is a match, theIFIB slice 26 yields an element list l (an FGID). Flow manager t thenforwards packet to element list l, over the fabric 14 with a fabricheader including type Consume.

For each element e in element list l:

-   -   Element e decodes fabric header, sees type Consume.    -   Element e bypasses MFIB/Pre-IFIB look-ups and processes packet        locally.    -   Element e delivers packet to application.

Handling of an unfragmented ICMP Echo Request Packet will be discussednext. In the case of an unfragmented ICMP Echo Request Packet, a packetarrives on receiving element r. Element r looks up the packet in the FIBand determines that it is local. Element r then looks up the packet inthe Pre-IFIB 24 and finds that the packet has both local interest (thelocal flag is set) and is wanted by an application (the opcode isDeliver). Element r responds to the ICMP Echo Request Packet. (Theimplementation of local applications is element-specific.) Element rdelivers the packet to the fabric address specified in the Pre-IFIBentry.

Handling of an unfragmented ICMP Packet with embedded header will bediscussed next. In the case of an unfragmented ICMP Packet with embeddedheader, a packet arrives on receiving element r. Element r looks up thepacket in the FIB and determines that it is local. Element r thendetects that this is an unfragmented ICMP Packet that includes anembedded IP header. Element r uses the L4 protocol type and reversedsource and destination address and port fields from the embedded headerto do the Pre-IFIB look-up, rather than those fields from the IP header.Processing proceeds as normal.

Handling of a packet fragment will be discussed next. A packet arriveson receiving element r. Element r looks up packet in the FIB anddetermines that it is local. Element r detects that this is a fragment.Element r hashes the source and destination addresses to yield thefabric address of a route processors f.

Element r forwards the packet to element f, with type Consume. Element freceives the packet, skips the FIB/Pre-IFIB look-ups and places it in areassembly buffer.

If the packet is now complete, element f processes it as if it had justarrived from the outside (type Forward).

Handling of a non-critical packet on a congested receiving element willbe discussed next. In one embodiment, non-critical packets on acongested receiving element are dropped. A packet arrives on congestedreceiving element r. Element r looks up the packet in the Pre-IFIBassociated with element r.

If the Pre-IFIB indicates that the packet is not in a critical flow, thepacket is dropped. Element r looks up the packet in the FIB. If thepacket is not local, it is dropped. Processing proceeds as normal.

In some embodiments, the methods described above are implemented as acomputer data signal embodied in a carrier wave, that represents asequence of instructions which, when executed by a processor, such asprocessor 118 in FIG. 1, cause the processor to perform the respectivemethod. In other embodiments, the methods are implemented as acomputer-accessible medium having executable instructions capable ofdirecting a processor, such as route processor 12 in FIGS. 1-6, toperform the respective method. In varying embodiments, the medium is amagnetic medium, an electronic medium, or an optical medium.

CONCLUSION

Apparatus, system and methods that support forwarding of locallyaddressed packets in routers have been described. Although specificembodiments have been illustrated and described herein, it will beappreciated by those of ordinary skill in the art that any arrangementthat is calculated to achieve the same purpose may be substituted forthe specific embodiments shown. This application is intended to coverany adaptations or variations of the present invention. For example,although described in object-oriented terms, one of ordinary skill inthe art will appreciate that the invention can be implemented in aprocedural design environment or any other design environment thatprovides the required relationships.

In particular, one of skill in the art will readily appreciate that thenames of the methods and apparatus are not intended to limit embodimentsof the invention. Furthermore, additional methods and apparatus can beadded to the components, functions can be rearranged among thecomponents, and new components to correspond to future enhancements andphysical devices used in embodiments of the invention can be introducedwithout departing from the scope of embodiments of the invention. One ofskill in the art will readily recognize that embodiments of theinvention are applicable to future communication devices, different filesystems, and new data types.

It is intended that this invention be limited only by the followingclaims and equivalents thereof.

1. A router comprising: a plurality of loosely-coupled route processors,including a first route processor; and a line card operably coupled tothe plurality of route processors; wherein one or more route processorsinclude an internal forwarding information base (IFIB), wherein eachIFIB includes information used to route packets addressed to routerelements within the router; wherein the IFIB is organized as a list offlows terminating within the router, wherein the list of flows includesa first flow associated with packets directed to a first router element;wherein one of the plurality of route processors includes a portarbitrator, wherein the port arbitrator assembles and distributes theIFIB; and wherein one of the plurality of route processors includes aflow manager coupled to the port arbitrator and the line card, whereinthe flow manager receives portions of the IFIB from the port arbitratorand assigns sessions to router elements within the router as a functionof a router policy.
 2. The router of claim 1, wherein the line cardincludes a pre-IFIB, wherein the pre-IFIB includes a subset of the listof flows stored in the IFIB; wherein the pre-IFIB is used by the linecard to route a packet associated with the first flow to the firstrouter element.
 3. The router of claim 1, wherein one of the routeprocessors includes a pre-IFIB, wherein the pre-IFIB includes a subsetof the list of flows stored in the IFIB; wherein the pre-IFIB is used bythe route processor to route a packet associated with the first flow tothe first router element.
 4. The router of claim 1, wherein one of theplurality of route processors includes a flow manager operably coupledto the port arbitrator and to the line card, wherein the flow managerreceives a locally-addressed packet from the line card and assigns asession to a router element as a function of router policy.
 5. A routercomprising: a plurality of loosely-coupled route processors, including afirst route processor; and a line card operably coupled to the pluralityof route processors; wherein one or more route processors include aninternal forwarding information base (IFIB), wherein each IFIB includesinformation used to route packets addressed to router elements withinthe router, wherein the router elements include a first router elementand a second router element, wherein the IFIB is organized as a list offlows terminating within the router, the list of flows includes a firstflow associated with packets directed to the first router element;wherein one of the plurality of route processors includes a portarbitrator, the port arbitrator assembles and distributes the IFIB;wherein the second router element includes a pre-IFIB, wherein thepre-IFIB includes a subset of the list of flows stored in the IFIB; andwherein the pre-IFIB is used by the second router element to route apacket associated with the first flow to the first router element. 6.The router of claim 5, wherein the pre-IFIB is stored in a ternarycontent addressable memory (TCAM).
 7. A computer-readable medium,wherein the computer-readable medium stores thereon program codeexecutable by a processor which, when installed in a router having aline card and a plurality of route-processors, creates a port arbitratorand a flow manager, the program code further comprising: program codefor operably coupling the flow manager port arbitrator and to the linecard; program code for assembling, within the port arbitrator, aninternal forwarding information base (IFIB) associated with flows tointernal elements of the router and for distributing portions of theIFIB to the flow manager; and program code for receiving, at the flowmanager, a locally-addressed packet from the line card and for assigninga session to a router element as a function of a router policy.
 8. Arouter, comprising: a network; a plurality of router elements operablycoupled across the network, wherein the plurality of router elementsinclude a line card and a plurality of route processors, wherein theplurality of route processors include a first route processor; whereinthe first route processor includes an internal forwarding informationbase (IFIB), wherein the IFIB is organized as a list of flowsterminating within the router; and wherein one or more router elementsinclude a pre-IFIB, wherein the pre-IFIB includes a subset of the listof flows terminating within the router.
 9. The router of claim 8,wherein the first route processor includes a port arbitrator, whereinthe port arbitrator assembles the IFIB and distributes it to one or moreroute processors.
 10. The router according to claim 8, wherein the firstroute processor includes a port arbitrator, wherein the port arbitratorassembles the IFIB; and wherein one of the plurality of route processorsincludes a flow manager, wherein the port arbitrator distributes theIFIB to the flow manager.
 11. A computerized method for managing arouter having a plurality of router elements, wherein the routerelements include a line card and a plurality of route processors, themethod comprising: generating an internal forwarding information base(IFIB), wherein the IFIB maps one or more flows to the router elements;distributing the internal forwarding information base to at least onerouter element; and wherein one or more router elements include apre-IFIB, wherein the pre-IFIB includes a subset of the list of flowsterminating within the router.
 12. The computerized method as in claim11, wherein generating includes establishing a port arbitrator withinone of the route processors, wherein the port arbitrator assembles theIFIB as a function of flows associated with router elements within therouter and distributes the IFIB to one or more of the route processors.13. A router, comprising: a plurality of loosely-coupled routeprocessors, including a first route processor; a line card operablycoupled to the plurality of route processors; and means for maintainingan internal forwarding information base (IFIB), wherein the IFIBincludes information used to route locally addressed packets to one ormore of the route processors, wherein the means for maintaining includesa port arbitrator executing within the first route processor, whereinthe port arbitrator assembles and distributes the IFIB; wherein the IFIBis organized as a list of flows terminating within the router and thelist of flows including a first flow associated with packets directed tothe first route processor; and wherein one of the plurality of routeprocessors includes a flow manager coupled to the port arbitrator andthe line card, wherein the flow manager receives portions of the IFIBfrom the port arbitrator and assigns sessions to router elements withinthe router as a function of a router policy.
 14. A router comprising: aplurality of loosely-coupled route processors, including a first routeprocessor; a line card operably coupled to the plurality of routeprocessors; and means for maintaining an internal forwarding informationbase (IFIB), wherein the IFIB includes information used to route locallyaddressed packets to one or more of the route processors; wherein theIFIB is organized as a list of flows terminating within the router,wherein the list of flows includes a first flow associated with packetsdirected to a first router element within the router; wherein the firstroute processor includes a pre-IFIB, wherein the pre-IFIB includes asubset of the list of flows stored in the IFIB; and wherein the firstroute processor uses its pre-IFIB to route a packet associated with thefirst flow to the first router element.
 15. The router of claim 14,wherein the pre-IFIB is stored in a ternary content addressable memory(TCAM).